package com.dongdongshop.controller;

import com.dongdongshop.common.Result;
import com.dongdongshop.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @PostMapping
    public Result submitOrder(@RequestParam Long addrId,
                              @RequestParam Integer payType,
                              @RequestHeader String AutharizeToken){
        orderService.createOrder(addrId,payType,AutharizeToken);
        return Result.OK();
    }
}
